package com.wudl.govern.service.impl;

import com.wudl.govern.domain.MetaTriggerHistory;
import com.wudl.govern.mapper.MetaTriggerHistoryMapp;
import com.wudl.govern.service.MetaTriggerHistoryService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * meta_trigger_history Service
 *
 * @author wudl
 */
@Service
public class MetaTriggerHistoryServiceImpl implements MetaTriggerHistoryService {

    @Autowired
    private MetaTriggerHistoryMapp metaTriggerHistoryMapp;

    /**
     * 分页查询
     */
    @Override
    public  List<MetaTriggerHistory> page(Integer page, Integer size) {
        PageHelper.startPage(page, size);
        return  metaTriggerHistoryMapp.selectList();
    }

    /**
     * 获取
     */
    @Override
    public MetaTriggerHistory getById(Integer id) {
        return metaTriggerHistoryMapp.selectById(id);
    }

    /**
     * 保存
     */
    @Override
    public void save(MetaTriggerHistory metaTriggerHistory) {
        metaTriggerHistoryMapp.insert(metaTriggerHistory);
    }

    /**
     * 更新
     */
    @Override
    public void updateById(MetaTriggerHistory metaTriggerHistory) {
        metaTriggerHistoryMapp.updateById(metaTriggerHistory);
    }

    /**
     * 删除
     */
    @Override
    public void removeById(Integer id) {
        metaTriggerHistoryMapp.deleteById(id);
    }

}